#include <iostream>
#include <queue>
using namespace std;



int main() {
    int t;
    cin >> t;

    while (t--) {
        int h;
        cin >> h;
        int ret=0;
        int add=1;
        while(h>0)
        {
            h-=add;
            if(h%(2*add)==0)
            {
                add*=2;
            }           
            ret++;
        }
        
        cout << ret << endl;
    }
    return 0;
}
